namespace Nexia.FluentHtmlElements.Utilities
{
	public interface IStringTrimmer
	{
		/// <summary>
		/// This method will cut off the given input string at the first space in the characters between cutoff and cutoff + fudgeFactor.
		/// If no space is found, then the string is timmed to the cutOff length.
		/// </summary>
		/// <param name="input">The input string to trim</param>
		/// <param name="cutOff">The cut off length</param>
		/// <param name="fudgeFactor">The cut off length fudge factor</param>
		/// <returns></returns>
		string WordAwareTrim(string input, int cutOff, int fudgeFactor);

		/// <summary>
		/// Start at startIndex and proceed till startIndex + count (or end of string) returning the index of the first space character encountered.
		/// </summary>
		/// <remarks>Unlike String.IndexOf this method does not throw when count exceeds the bounds of the string.</remarks>
		/// <param name="input">The input string</param>
		/// <param name="startIndex">The index to start looking for a space</param>
		/// <param name="count">The max number of characters to examine (starting at startIndex)</param>
		/// <returns></returns>
		int IndexOfSpace(string input, int startIndex, int count);
	}
}